﻿using DGIS.Model;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;

namespace DGIS.GscloudService.IService
{
    public interface IGsCloudService
    {
        /// <summary>
        /// 获取在线影像集合
        /// </summary>
        /// <param name="postDataStr"></param>
        /// <param name="cookieContainer"></param>
        /// <returns></returns>
        List<GSCloud> QueryGSCloudList(string postDataStr, ref CookieContainer cookieContainer);

        /// <summary>
        /// 获取在线数据类型集合
        /// </summary>
        /// <returns></returns>
        List<GSDataSet> QueryGSDataSetList();

        /// <summary>
        /// 添加数据
        /// </summary>
        /// <param name="items"></param>
        /// <returns></returns>
        bool AddGSDataSets(List<GSDataSet> items);

        /// <summary>
        /// 获取本地数据类型集合
        /// </summary>
        /// <returns></returns>
        List<GSDataSet> GetGSDataSetList();

        /// <summary>
        /// 获取影像数据真实下载地址
        /// </summary>
        /// <param name="dataId"></param>
        /// <param name="type"></param>
        /// <param name="cookieContainer"></param>
        /// <returns></returns>
        string QueryImgDownloadUrl(string dataId, string type, ref CookieContainer cookieContainer);

        /// <summary>
        /// 用户登录
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="psw"></param>
        /// <param name="key"></param>
        /// <param name="code"></param>
        /// <param name="cookieContainer"></param>
        /// <returns></returns>
        GSUser LoginGSCloud(string userName, string psw,string key,string code, ref CookieContainer cookieContainer,out int resultCode);


        Stream GetLoginValidateImg(ref CookieContainer cookieContainer, out string codekey);

        bool CheackValidate(string value, string code, ref CookieContainer cookieContainer);
    }
}
